/* eslint-disable*/
const app = resolve => require(['../App'], resolve);
const auth = resolve => require(['../pageComponents/auth'], resolve);
const register = resolve => require(['../components/register'], resolve);
const login = resolve => require(['../components/login'], resolve);
const personal = resolve => require(['../pageComponents/personal'], resolve);
const resetPassword = resolve => require(['../pageComponents/resetPassword'], resolve);
const addressWarehouse = resolve => require(['../pageComponents/addressWarehouse'], resolve);
const addRess = resolve => require(['../pageComponents/addRess'], resolve);
const myOrder = resolve => require(['../pageComponents/myOrder'], resolve);
const shoppingMall = resolve => require(['../pageComponents/shoppingMall'], resolve);
// const recommend = resolve => require(['../components/mall/recommend'], resolve);
const ExplodingSpike = resolve => require(['../pageComponents/ExplodingSpike'], resolve);
const Snap = resolve => require(['../components/CriticalSection/Snap'], resolve);
const aboutSnap = resolve => require(['../components/CriticalSection/aboutSnap'], resolve);
const detailPage = resolve => require(['../pageComponents/detailPage'], resolve);
const shoppingCart = resolve => require(['../pageComponents/shoppingCart'], resolve);
const account = resolve => require(['../pageComponents/account'], resolve);
const onlinePayment = resolve => require(['../pageComponents/onlinePayment'], resolve);
const search = resolve => require(['../pageComponents/search'], resolve);
const searchCommodity = resolve => require(['../pageComponents/searchCommodity'], resolve);
const notFound = resolve => require(['../pageComponents/notFound'], resolve);
const payment = resolve => require(['../pageComponents/payment'], resolve);
// const notFound = resolve => require(['@cpt/notFound'], resolve);
export const routes = [
  {
    path: '/',
    name: 'app',
    component: app,
    meta: {
      bottomBoole: true
    },
    children: [
      {
        path: 'auth',
        name: 'auth',
        redirect: 'auth/login',
        component: auth,
        children: [
          {
            path: 'login',
            name: 'login',
            component: login,
          },
          {
            path: 'register',
            name: 'register',
            component: register,
          },
        ],
      },
      {
        path: 'resetPassword',
        name: 'resetPassword',
        component: resetPassword,
        meta: {
          title: '忘记密码',
          booleHeader: true
        }
      },
      {
        path: 'personal',
        name: 'personal',
        component: personal,
        meta: {
          bottomBoole: true
        }
      },
      {
        path: 'addressWarehouse',
        name: 'addressWarehouse',
        component: addressWarehouse,
        meta: {
          title: '收货地址',
          booleHeader: true,
        }
      },
      {
        path: 'address',
        name: 'address',
        component: addRess,
        meta: {
          title: '添加收货地址',
          booleHeader: true,
        }
      },
      {
        path: 'myOrder',
        name: 'myOrder',
        component: myOrder,
        meta: {
          title: '我的订单',
          booleHeader: true,
        }
      },
      {
        path: 'shoppingMall',
        name: 'shoppingMall',
        component: shoppingMall,
        meta: {
          bottomBoole: true
        }
      },
      {
        path: 'ExplodingSpike',
        name: 'ExplodingSpike',
        redirect: 'ExplodingSpike/Snap',
        component: ExplodingSpike,
        meta:{
          title: '爆款秒杀',
          booleHeader: true,
        },
        children: [
          {
            path: 'Snap',
            name: 'Snap',
            component: Snap,
            meta:{
              title: '爆款秒杀',
              booleHeader: true,
            },
          },
          {
            path: 'aboutSnap',
            name: 'aboutSnap',
            component: aboutSnap,
            meta:{
              title: '爆款秒杀',
              booleHeader: true,
            },
          },
        ]
      },
      {
        path:'detailPage/:data',
        name: 'detailPage',
        component: detailPage,
      },
      {
        path:'shoppingCart',
        name: 'shoppingCart',
        component: shoppingCart,
        meta: {
          title: '购物车',
          rightTextBoole: true,
          booleHeader: true,
          detailPage: 1,
        }
      },
      {
        path: 'account/:id',
        name: 'account',
        component: account,
        meta: {
          title: '确认订单',
          booleHeader: true,
        }
      },
      {
        path: 'onlinePayment',
        name: 'onlinePayment',
        component: onlinePayment,
        meta: {
          title: '在线支付',
          booleHeader: true,
        }
      },
      {
        path: 'search',
        name: 'search',
        component: search,
      },
      {
        path: 'searchCommodity',
        name: 'searchCommodity',
        component: searchCommodity,
      },
      {
        path: 'payment',
        name: 'payment',
        component: payment,
        meta: {
          title: '正在支付',
          booleHeader: true,
        }
      }
    ],
  },
  {
    path: '*',
    name: 'not-found',
    component: notFound,
  },
];
